<template>
  <div class="auth-layout">
    <!-- 自定义标题栏 (仅在Electron环境下显示) -->
    <TitleBar v-if="isElectron" />

    <router-view />
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import TitleBar from '@/components/electron/TitleBar.vue'

// 认证页面布局组件
// 检查是否在Electron环境
const isElectron = computed(() => {
  return !!(window as any).electronAPI
})
</script>

<style lang="scss" scoped>
.auth-layout {
  min-height: 100vh;
  background-color: var(--bg-color-primary);
  color: var(--text-color-primary);
  display: flex;
  flex-direction: column;

  // 确保自定义标题栏在最顶部
  > :first-child {
    flex-shrink: 0;
  }
}
</style>
